package com.hyd.issues;

import com.hyd.issues.json.JsonResult;
import com.opensymphony.xwork2.ActionContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * (description)
 *
 * @author yiding.he
 */
public class ExceptionAction extends BaseAction {

    static final Log log = LogFactory.getLog(ExceptionAction.class);

    public JsonResult execute() {
        Exception e = (Exception) ActionContext.getContext().getValueStack().findValue("exception");
        log.error("Action 执行失败", e);
        return JsonResult.fail(e.getMessage());
    }
}
